<?php

namespace App\Validators\Clbum;

use App\Validators\PassesValidator;
use \Prettus\Validator\Contracts\ValidatorInterface;
use \Prettus\Validator\LaravelValidator;

class ClbumValidator extends LaravelValidator
{
    use PassesValidator;
    protected $rulesMessages=[
        'name.required' => '班级名称是必填的',
        'grade_id.required' => '所属年纪是必选的',
        'header_teacher_user_id.required' => '班主任是必填的',
        'CLBUM_EXT_COURSE_LEADERS.required'  => '科代表扩展是必选的',
        'CLBUM_EXT_COURSE_TEACHERS.required'  => '科任老师扩展是必选的',
        'CLBUM_EXT_STUDENT_LEADERS.required'  => '班级干部扩展是必选的',
    ];
    protected $rules = [
        ValidatorInterface::RULE_CREATE => [
            'name'=>'required',
            'grade_id'=>'required',
            'header_teacher_user_id'=>'required',
            'CLBUM_EXT_COURSE_LEADERS'=>'required',
            'CLBUM_EXT_COURSE_TEACHERS'=>'required',
            'CLBUM_EXT_STUDENT_LEADERS'=>'required',

        ],
        ValidatorInterface::RULE_UPDATE => [
            'name'=>'required',
            'grade_id'=>'required',
            'header_teacher_user_id'=>'required',
            'CLBUM_EXT_COURSE_LEADERS'=>'required',
            'CLBUM_EXT_COURSE_TEACHERS'=>'required',
            'CLBUM_EXT_STUDENT_LEADERS'=>'required',
        ],
   ];
}
